#############################
##### Solution makefile #####
#############################

include ./makeconf


OopC:                                      \
	ShowInfo                               \
	CreateDir                              \
	_OO_1_Library                          \
	_LB_1_MemoryManager                    \
	_OO_2_Encapsulation                    \
	_OO_3_Inheritance                      \
	_OO_4_Polymorphism                     \
	_DP_1_Creational_SimpleFactorySample   \
	_DP_2_Creational_FactoryMethodSample   \
	_DP_10_Structural_FacadeSample         \
	_DP_11_Structural_FlyweightSample      \
	_DP_3_Creational_AbstractFactorySample \
	_DP_4_Creational_BuilderSample         \
	_DP_5_Creational_SingletonSample       \
	_DP_6_Structural_AdapterSample         \
	_DP_7_Structural_BridgeSample          \
	_DP_8_Structural_CompositeSample       \
	_DP_9_Structural_DecoratorSample       \
	_LB_2_Multithread                      \
	SuccessFlag                            \

ShowInfo:
	echo $(BuildType) $(Configuration) \
	echo $(SolutionDir)                \

# create solution dir
CreateDir:
	mkdir -p $(Incl);                   \
	mkdir -p $(Bin)/x86 $(Bin)/x64;     \

_OO_1_Library:
	cd ./_OO_1_Library/; pwd; \
	$(Make) -f ./makefile;    \

_OO_2_Encapsulation:
	cd ./_OO_2_Encapsulation/; pwd; \
	$(Make) -f ./makefile;          \

_OO_3_Inheritance:
	cd ./_OO_3_Inheritance/; pwd; \
	$(Make) -f ./makefile;        \

_OO_4_Polymorphism:
	cd ./_OO_4_Polymorphism/; pwd; \
	$(Make) -f ./makefile;         \

_DP_1_Creational_SimpleFactorySample:
	cd ./_DP_1_Creational_SimpleFactorySample/; pwd; \
	$(Make) -f ./makefile;                           \

_DP_2_Creational_FactoryMethodSample:
	cd ./_DP_2_Creational_FactoryMethodSample/; pwd; \
	$(Make) -f ./makefile;                           \

_DP_3_Creational_AbstractFactorySample:
	cd ./_DP_3_Creational_AbstractFactorySample/; pwd; \
	$(Make) -f ./makefile;                             \

_DP_4_Creational_BuilderSample:
	cd ./_DP_4_Creational_BuilderSample/; pwd; \
	$(Make) -f ./makefile;                     \

_DP_5_Creational_SingletonSample:
	cd ./_DP_5_Creational_SingletonSample/; pwd; \
	$(Make) -f ./makefile;                       \

_DP_6_Structural_AdapterSample:
	cd ./_DP_6_Structural_AdapterSample/; pwd; \
	$(Make) -f ./makefile;                     \

_DP_7_Structural_BridgeSample:
	cd ./_DP_7_Structural_BridgeSample/; pwd; \
	$(Make) -f ./makefile;                    \

# 未完成
_DP_8_Structural_CompositeSample:
	cd ./_DP_8_Structural_CompositeSample/; pwd; \
	$(Make) -f ./makefile;                       \

_DP_9_Structural_DecoratorSample:
	cd ./_DP_9_Structural_DecoratorSample/; pwd; \
	$(Make) -f ./makefile;                       \

_DP_10_Structural_FacadeSample:
	cd ./_DP_10_Structural_FacadeSample/; pwd; \
	$(Make) -f ./makefile;                     \

# 未完成
_DP_11_Structural_FlyweightSample:
	cd ./_DP_11_Structural_FlyweightSample/; pwd; \
	$(Make) -f ./makefile;                        \

# 未完成
_LB_1_MemoryManager:
	cd ./_LB_1_MemoryManager/; pwd; \
	$(Make) -f ./makefile;          \

_LB_2_Multithread:
	cd ./_LB_2_Multithread/; pwd; \
	$(Make) -f ./makefile;        \

SuccessFlag:
	echo "All done!" \


.PHONY: Clean
Clean:
	cd ./_OO_1_Library/; pwd;      \
	$(Make) -f ./makefile Clean;   \
	                               \
	cd ./_OO_2_Encapsulation; pwd; \
	$(Make) -f ./makefile Clean;   \
	                               \
	cd ..; pwd;                    \
